﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using XDesigner.ORM ;
using 刘颜红销售项目管理.Business ;
using 刘颜红销售项目管理.Business.DOM ;

namespace 刘颜红销售项目管理
{
    public partial class frm订购机型表 : DevExpress.XtraEditors.XtraForm
    {
        public frm订购机型表()
        {
            InitializeComponent();
        }

        private Class项目基本信息 _项目对象 = null;

        public Class项目基本信息 项目对象
        {
            get { return _项目对象; }
            set { _项目对象 = value; }
        }

        private void frm订购机型表_Load(object sender, EventArgs e)
        {
            
        }

        public void RefreshView()
        {
            lst机型.DataSource = MyApplicationFramework.Instance.ORMEngine.ReadAllInstances(typeof(Class产品型号));
            if (this.项目对象 == null)
            {
                gd订购机型.DataSource = null;
            }
            else
            {
                gd订购机型.DataSource = ORMBindingSource.CreatePackage( this.项目对象 , typeof( Class订购机型 ) , this.项目对象.订购机型);
            }
        }
    }
}